#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
#include"list.h"
#include"vector.h"
#include"reverse_iterator.h"
void test()
{
	zjs::list<int>l;
	l.push_back(1);
	l.push_back(2);
	l.push_back(3);
	l.push_back(4);
	l.push_front(1);
	l.push_front(2);
	l.push_front(3);
	l.push_front(4);
	l.pop_back();
	l.pop_back();
	l.pop_back();
	l.pop_front();
	l.pop_front();
	l.pop_front();
	l.pop_front();
	l.pop_front();
	l.pop_front();
	auto pos = l.begin();
	while (pos != l.end())
	{
		cout << *pos << endl;
		pos++;
	}
}

void test1()
{
	zjs::list<int>l1;
	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(13);
	l1.push_back(14);
	zjs::list<int>l2(l1);
	for (auto x : l2)
		cout << x << " ";
}

void test2()
{
	zjs::list<int>l1;
	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(13);
	l1.push_back(14);
	zjs::list<int>::reverse_iterator rit=l1.rbegin();
	while (rit != l1.rend())
	{
		cout << *rit << endl;
		rit++;
	}
}

void test3()
{
	zjs::vector<int>v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	//v.pop_back();
	//v.erase(v.begin());
	//v.erase(v.end()-1);
	v.insert(v.begin(), 1);
	v.insert(v.end(), 2);
	for (auto x : v)
		cout << x << " ";
}

void test4()
{
	zjs::vector<int>l1;
	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(13);
	l1.push_back(14);
	zjs::vector<int>::reverse_iterator rit = l1.rbegin();
	while (rit != l1.rend())
	{
		cout << *rit << endl;
		rit++;
	}
}
int main()
{
	test4();
	return 0;
}